 // 获取用户信息
 import { getToken} from './../../utils/token.js'
import instance from './../../utils/axios.js'
 function getUserInfo() {
    return instance({
        url: `/v1_0/user/profile`,
        method: 'get',
      headers: {
        'Authorization' :`Bearer ${getToken().token}`
        }
      })
}
export { getUserInfo }
// 编辑用户信息
function editUserInfo(data) {
  return instance({
      url: `/v1_0/user/profile`,
    method: 'patch',
      data,
    headers: {
      'Authorization' :`Bearer ${getToken().token}`
      }
    })
}
export { editUserInfo }

// 编辑头像
function editUserPhoto(fd) {
  return instance({
      url: `/v1_0/user/photo`,
    method: 'patch',
      data:fd,
    headers: {
      'Authorization' :`Bearer ${getToken().token}`
      }
    })
}
export { editUserPhoto }
